import Vue from 'vue'
import app from './App.vue'

import VueRouter from 'vue-router'
Vue.use(VueRouter)

import router from './router.js'

//导入vue-resource
import VueResource from 'vue-resource'
Vue.use(VueResource)
//设置请求根路径
// Vue.http.options.root = 'http://'

//导入时间插件
import moment from 'moment'
//------定义全局过滤器
  Vue.filter('dateFormate', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss'){
    return moment(dataStr).format(pattern)
  })
//-------
// 安装图片预览
import VuePreview from 'vue-preview'
Vue.use(VuePreview)

//按需导入
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
//顶部组件
// import {Header, Swipe, SwipeItem, Button, Lazyload } from 'mint-ui'
// Vue.component(Header.name, Header)
// Vue.component(Swipe.name, Swipe)
// Vue.component(SwipeItem.name, SwipeItem)
// Vue.component(Button.name, Button)
// Vue.component(Lazyload.name, Lazyload)
// Vue.use(Lazyload)
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)

var vm = new Vue({
  el: '#app',
  data: {
  },
  render: c => c(app),
  router
})

//cnpm i babel-plugin-component
